﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace K2AlgoExtensions
{

    /// <summary>
    /// Demonstrates how to write a barebones
    /// publisher
    /// </summary>
    public class K2BareBonesPub : KaiTrade.TradeObjects.PXUpdateBase, KaiTrade.Interfaces.Publisher
    {

        private string m_Topic = "";

        private KaiTrade.Interfaces.Status m_Status = KaiTrade.Interfaces.Status.loaded;

        static int s_FileCount = 0;

        public K2BareBonesPub()
            : base("K2BareBonesPub")
        {

        }



        public override void From(KaiTrade.Interfaces.PXUpdate update)
        {
            //  Add your things here

        }

        public void Close()
        {
            throw new NotImplementedException();
        }

        public List<KaiTrade.Interfaces.Field> FieldList
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public void OnImage(List<KaiTrade.Interfaces.Field> itemList)
        {
            throw new NotImplementedException();
        }

        public void OnStatusChange(List<KaiTrade.Interfaces.Field> itemList)
        {
            throw new NotImplementedException();
        }

        public void OnUpdate(string mnemonic, KaiTrade.Interfaces.PXUpdate pxUpdate)
        {
            throw new NotImplementedException();
        }

        public void OnUpdate(string myID, string myValue)
        {
            throw new NotImplementedException();
        }

        public void OnUpdate(List<KaiTrade.Interfaces.Field> itemList)
        {
            throw new NotImplementedException();
        }

        public string Open(string myData)
        {
            try
            {
            }
            catch (Exception myE)
            {
            }
            return "";
        }

        public string PublisherType
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public KaiTrade.Interfaces.Status Status
        {
            get
            {
                return m_Status;
            }
            set
            {
                m_Status = value;
            }
        }

        public void Subscribe(KaiTrade.Interfaces.Subscriber mySubscriber)
        {
            throw new NotImplementedException();
        }

        public string Tag
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public string TopicID()
        {
            return m_Topic;
        }

        public string TopicID(string myData)
        {
            m_Topic = myData;
            return m_Topic;
        }

        public void UnSubscribe(KaiTrade.Interfaces.Subscriber mySubscriber)
        {
            throw new NotImplementedException();
        }


    }
}
